#include "SparkEditorMenuEdit.h"
#include "SparkEditorResource.h"
#include "SparkEditorGlobal.h"


SparkEditorMenuEdit::SparkEditorMenuEdit()
{
	wxMenuItem* actUndo = new wxMenuItem(this, IDMENU_EDIT_UNDO, wxT("Undo"), wxT("Undo"), wxITEM_NORMAL);
	wxBitmap actUndoBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/undo.png"));
	actUndo->SetBitmap(actUndoBitmap);
	this->Append(actUndo);

	wxMenuItem* actRedo = new wxMenuItem(this, IDMENU_EDIT_REDO, wxT("Redo"), wxT("Redo"), wxITEM_NORMAL);
	wxBitmap actRedoBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/redo.png"));
	actRedo->SetBitmap(actRedoBitmap);
	this->Append(actRedo);

	// Separator
	this->AppendSeparator();

	wxMenuItem* actEditCopy = new wxMenuItem(this, IDMENU_EDIT_COPY, wxT("Copy"), wxT("Copy Selected Object"), wxITEM_NORMAL);
	wxBitmap actEditCopyBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editcopy.png"));
	actEditCopy->SetBitmap(actEditCopyBitmap);
	this->Append(actEditCopy);

	wxMenuItem* actEditCut = new wxMenuItem(this, IDMENU_EDIT_CUT, wxT("Cut"), wxT("Cut Selected Object"), wxITEM_NORMAL);
	wxBitmap actEditCutBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editcut.png"));
	actEditCut->SetBitmap(actEditCutBitmap);
	this->Append(actEditCut);

	wxMenuItem* actEditPaste = new wxMenuItem(this, IDMENU_EDIT_PASTE, wxT("Paste"), wxT("Paste Object From Clipboard"), wxITEM_NORMAL);
	wxBitmap actEditPasteBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editpaste.png"));
	actEditPaste->SetBitmap(actEditPasteBitmap);
	this->Append(actEditPaste);

	wxMenuItem* actEditDelete = new wxMenuItem(this, IDMENU_EDIT_DELETE, wxT("Delete"), wxT("Delete Selected Object"), wxITEM_NORMAL);
	wxBitmap actEditDeleteBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/trash.png"));
	actEditDelete->SetBitmap(actEditDeleteBitmap);
	this->Append(actEditDelete);

	wxMenuItem* actEditRename = new wxMenuItem(this, IDMENU_EDIT_RENAME, wxT("Rename"), wxT("Rename Selected Item"), wxITEM_NORMAL);
	wxBitmap actEditRenameBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editrename.png"));
	actEditRename->SetBitmap(actEditRenameBitmap);
	this->Append(actEditRename);

	wxMenuItem* actEditCopyToTemplate = new wxMenuItem(this, IDMENU_EDIT_COPY_TO_TEMPLATE, wxT("Copy to Template"), wxT("Copy Object as a Template"), wxITEM_NORMAL);
	wxBitmap actEditCopyToTemplateBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editcopy.png"));
	actEditCopyToTemplate->SetBitmap(actEditCopyToTemplateBitmap);
	this->Append(actEditCopyToTemplate);

	wxMenuItem* actEditCopyToTemplateWithChildren = new wxMenuItem(this, IDMENU_EDIT_COPY_TO_TEMPLATE_WITH_CHILDREN, wxT("Copy to Template with Children"), wxT("Copy Object and Children as a Template"), wxITEM_NORMAL);
	wxBitmap actEditCopyToTemplateWithChildrenBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/editcopy.png"));
	actEditCopyToTemplateWithChildren->SetBitmap(actEditCopyToTemplateWithChildrenBitmap);
	this->Append(actEditCopyToTemplateWithChildren);

	wxMenuItem* actIncreaseGizmoScale = new wxMenuItem(this, IDMENU_EDIT_INCREASE_GIZMO_SCALE, wxT("Increase Gizmo Scale"), wxT("Increase Gizmo Scale"), wxITEM_NORMAL);
	wxBitmap actIncreaseGizmoScaleBitmapBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/sign_plus.png"));
	actIncreaseGizmoScale->SetBitmap(actIncreaseGizmoScaleBitmapBitmap);
	this->Append(actIncreaseGizmoScale);

	wxMenuItem* actDecreaseGizmoScale = new wxMenuItem(this, IDMENU_EDIT_DECREASE_GIZMO_SCALE, wxT("Decrease Gizmo Scale"), wxT("Decrease Gizmo Scale"), wxITEM_NORMAL);
	wxBitmap actDecreaseGizmoScaleBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/sign_minus.png"));
	actDecreaseGizmoScale->SetBitmap(actDecreaseGizmoScaleBitmap);
	this->Append(actDecreaseGizmoScale);

	// Separator
	this->AppendSeparator();

	wxMenuItem* actSceneOptions = new wxMenuItem(this, IDMENU_EDIT_SETTINGS, wxT("Settings"), wxT("Ogitor scene Settings"), wxITEM_NORMAL);
	wxBitmap actSceneOptionsBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/settings.png"));
	actSceneOptions->SetBitmap(actSceneOptionsBitmap);
	this->Append(actSceneOptions);

	wxMenuItem* actOpenPreferences = new wxMenuItem(this, IDMENU_EDIT_PREFERENCES, wxT("Preferences"), wxT("New Scene"), wxITEM_NORMAL);
	wxBitmap actOpenPreferencesBitmap(SparkEditorGlobal::GetDataPath() + wxT("icons/preferences.png"));
	actOpenPreferences->SetBitmap(actOpenPreferencesBitmap);
	this->Append(actOpenPreferences);
}


SparkEditorMenuEdit::~SparkEditorMenuEdit()
{

}

void SparkEditorMenuEdit::ConnectEvent(void)
{
	Connect(IDMENU_EDIT_UNDO, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditUndo));
	Connect(IDMENU_EDIT_REDO, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditRedo));

	Connect(IDMENU_EDIT_COPY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditCopy));
	Connect(IDMENU_EDIT_CUT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditCut));
	Connect(IDMENU_EDIT_PASTE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditPaste));
	Connect(IDMENU_EDIT_DELETE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditDelete));
	Connect(IDMENU_EDIT_RENAME, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditRename));
	Connect(IDMENU_EDIT_COPY_TO_TEMPLATE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditCopyToTemplate));
	Connect(IDMENU_EDIT_COPY_TO_TEMPLATE_WITH_CHILDREN, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditEditCopyToTemplateWithChildren));
	
	Connect(IDMENU_EDIT_INCREASE_GIZMO_SCALE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditIncreaseGizmoScale));
	Connect(IDMENU_EDIT_DECREASE_GIZMO_SCALE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditDecreaseGizmoScale));
	
	Connect(IDMENU_EDIT_SETTINGS, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditSceneOptions));
	Connect(IDMENU_EDIT_PREFERENCES, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SparkEditorMenuEdit::OnEditOpenPreferences));

}

void SparkEditorMenuEdit::OnEditUndo(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditRedo(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditCopy(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditCut(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditPaste(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditDelete(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditRename(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditCopyToTemplate(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditEditCopyToTemplateWithChildren(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditIncreaseGizmoScale(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditDecreaseGizmoScale(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditSceneOptions(wxCommandEvent& event)
{

}

void SparkEditorMenuEdit::OnEditOpenPreferences(wxCommandEvent& event)
{

}
